/*标签页点击变换背景颜色*/ 
var tabs = document.getElementById("tabs").getElementsByTagName("li");
/*标签页内容变换*/
var lists = document.getElementById("lists").getElementsByTagName("ul");
/*标签页滚动*/
var scroll = document.getElementById("lists")
for(var i=0; i<tabs.length; i++){
    tabs[i].onclick = showlist;
    lists[i].onclick = showlist;
}
function showlist(){
    for(var i=0; i<tabs.length; i++){
        if(tabs[i]===this){
            tabs[i].className = "active";
            lists[i].className = "clearfix active"
        }
        else{
            tabs[i].className = "";
            lists[i].className = "clearfix"
        }
    }
}

/*标签页滚动悬停 */
var scrollT = document.getElementById("scroll")
window.onscroll = function(){
    var scrollTop = document.documentElement.scrollTop;
    if(scrollTop >= 200){
        scrollT.className = "body-nav fixed";
    }else{
        scrollT.className = "body-nav";
    }
}


